package com.xu.mall.base.price;

import java.io.Serializable;

/**
 * 科目类型
 * 
 * @version Revision History
 * 
 *          <pre>
 * Author     Version       Date        Changes
 * lunan.xu   1.0           2012-11-4  Created
 * </pre>
 * 
 * @since 1.
 */
public class SubjectType implements Serializable {
	private static final long serialVersionUID = 3242323188885505750L;

	public static final SubjectType DR = SubjectType.valueOf("DR");
	public static final SubjectType CR = SubjectType.valueOf("CR");

	private String name;

	private SubjectType(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public static SubjectType valueOf(String type) {
		return new SubjectType(type.toUpperCase());
	}
}
